import base64


def image_to_base64(image_path):
    with open(image_path, "rb") as image_file:
        return base64.b64encode(image_file.read()).decode('utf-8')


# 生成Base64字符串（示例）
base64_icon = image_to_base64("白光~.png")
print(base64_icon)
